<%@ taglib prefix="atguigu" uri="http://www.atguigu.com/mytag/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%--
  Created by IntelliJ IDEA.
  User: lzy
  Date: 2018/8/13
  Time: 14:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Parent Tag</title>
</head>
<body>
<%--父标签打印name到控制台--%>
<atguigu:parentTag name="parent">
    <%--子标签以父标签的标签体存在，子标签把父标签的name属性打印到jsp页面上--%>
    <atguigu:sonTag/>
</atguigu:parentTag>

<br/><br/>

<c:choose>
    <c:when test="${param.age > 24}">大学毕业</c:when>
    <c:when test="${param.age > 20}">高中毕业</c:when>
    <c:otherwise>高中以下学历毕业</c:otherwise>
</c:choose>

<h4>使用自定义父子标签实现判断</h4>

<atguigu:choose>
    <atguigu:when test="${param.age > 24}">大学毕业</atguigu:when>
    <atguigu:when test="${param.age > 20}">高中毕业</atguigu:when>
    <atguigu:otherwise>高中以下学历毕业</atguigu:otherwise>
</atguigu:choose>
<br/><br/>
<%--使用EL自定义函数--%>
${fn:length(param.age)}

<br/><br/>
<%--测试自定义的EL函数--%>
${atguigu:contact("first string", "second string")}

<br/><br/>
${fn:toUpperCase("adbadfdsfdsfdsa")}
</body>
</html>
